package com.chris.libs.example.pages.ext.recyclerview;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import com.chris.libs.example.model.DataItem;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Chris chan
 * Create on： 2025/2/2 2:23
 * Use for:
 * Explain:
 */
public class RecyclerViewExampleViewModel extends ViewModel {
    private MutableLiveData<List<DataItem>> dataList;

    public RecyclerViewExampleViewModel() {
        this.dataList = new MutableLiveData<>();
        this.dataList.setValue(new ArrayList<>());
    }

    public MutableLiveData<List<DataItem>> getDataList() {
        return dataList;
    }

    public void setDataList(List<DataItem> dataList) {
        this.dataList.setValue(dataList);
    }
}
